package com.catmiw.util;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class CommonUtil {
    public static int bytesToInt(byte[] b){
        if (b==null||b.length!=4){
            return 0;
        }
        int rtn=0;
        for (int i=0;i<4;i++){
            rtn|=(b[i]<<24>>>(i*8));
        }

        return rtn;
    }
}
